
<% var th = path; %>
<% console.log(th); %>
<% var f_path = ''; %>
<% for(var i = th.length - 1;i >= 0;i--){ %>
<% f_path = f_path + th[i]; %>
<% } %>
<% var my_path = f_path.toString(); %>
<% var z_path = my_path.replace(/[a-z]{1,}(\w+?)\//,''); %>
<% var re_path = ''; %>
<% console.log(z_path); %>
<% for(var q=z_path.length - 1;q>=0;q--){ %>
<% re_path = re_path + z_path[q]; %>
<% } %>
<% console.log(re_path); %>


<main>
  <div ui-view="left" class="grade">
    <ul class="left_ul list-group">
      <li class="list-group-item item1"><span class="tubiao glyphicon glyphicon-th-list"></span>&#x3000;全部教程</li>
      <li class="list-group-item" style="background-color: #444444"><a class="a1" href="<%= re_path %>/one">初一</a></li>
      <li class="list-group-item"><a class="a2" href="<%= re_path %>/two">初二</a></li>
      <li class="list-group-item" style="background-color: #444444"><a class="a1" href="<%= re_path %>/three">初三</a></li>
      <li class="list-group-item"><a class="a2" href="">高一</a></li>
      <li class="list-group-item" style="background-color: #444444"><a class="a1" href="">高二</a></li>
      <li class="list-group-item"><a class="a2" href="">高三</a></li>
    </ul>
    <div class="container" style="margin-top: 40px;width: 240px">
      <div class="card-container-1" style="margin: 0;">
        <div class="card">
          <a style="font-size: 30px;text-align: center;line-height: 200px;text-decoration: none;color: #bfd3f8;" href="/index">学知识</a>
        </div>
        <div class="card">
          <a style="font-size: 30px;text-align: center;line-height: 200px;text-decoration: none;color: #bfd3f8;" href="/useranswer">讲道理</a>
        </div>
        <div class="card">
          <a style="font-size: 30px;text-align: center;line-height: 200px;text-decoration: none;color: #bfd3f8;" href="#">关于我</a>
        </div>
      </div>
    </div>
  </div>
  <div ui-view="right" class="right">
    <div class="part">
      <span class="glyphicon glyphicon-th-list"></span><span class="sp_title"><b>&#x3000;初一教材</b></span>
      <div class="content">
        <% books.forEach(function (book) { %>
        <div class="book">

          <p class="p_title">
            <%= book.title %>
            <%= book.author %>
            <%= book.lesson %>
            <%= book.content %>

          </p>
          <p>
            <!--希望字体可以左边对齐~~~~~~~~~~~~~~~~~~~~~~-->
            <!--<img src="images/0.jpg" alt=""/>-->
            <%= book.grade %>
          </p>

        </div>

        <% }) %>

      </div>
    </div>
  </div>
</main>
<script src="/javascripts/doc/js/index.js"></script>
<script>
  var th = '<%= path %>';
   console.log(th);
  var f_path = '';
  for(var i = th.length - 1;i >= 0;i--){
   f_path = f_path + th[i];
   }
   var my_path = f_path.toString();
  var z_path = my_path.replace(/[a-z]{1,}(\w+?)\//,'');
  var re_path = '';
  console.log(z_path);
  for(var q=z_path.length - 1;q>=0;q--){
    re_path = re_path + z_path[q];
  }
   console.log(re_path);
</script>